﻿// <copyright file="Wizard.cs" company="Microsoft Corporation">
// Copyright (c) 2009 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2010-01-11</date>
// <summary>Wizard class definition</summary>

namespace WebAnalyticsServiceWizard
{
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml;
    using System.Xml.Linq;
    using EnvDTE;
    using Microsoft.VisualStudio.TemplateWizard;

    /// <summary>
    /// Wizard to add a WebAnalyticsService declaration into the App.xaml Application.ApplicationLifetimeObjects element
    /// </summary>
    public class Wizard : IWizard
    {
        #region IWizard Members

        /// <summary>
        /// Runs custom wizard logic before opening an item in the template.
        /// </summary>
        /// <param name="projectItem">the project item</param>
        public void BeforeOpeningFile(EnvDTE.ProjectItem projectItem)
        {
        }

        /// <summary>
        /// Runs custom wizard logic when a project has finished generating.
        /// </summary>
        /// <param name="project">the project</param>
        public void ProjectFinishedGenerating(EnvDTE.Project project)
        {
        }

        /// <summary>
        /// Runs custom wizard logic when a project item has finished generating.
        /// </summary>
        /// <param name="projectItem">the new project item</param>
        public void ProjectItemFinishedGenerating(EnvDTE.ProjectItem projectItem)
        {
        }

        /// <summary>
        /// Runs custom wizard logic when the wizard has completed all tasks.
        /// </summary>
        public void RunFinished()
        {
        }

        /// <summary>
        /// Runs custom wizard logic at the beginning of a template wizard run.
        /// </summary>
        /// <param name="automationObject">the automation object</param>
        /// <param name="replacementsDictionary">the replacements dictionary</param>
        /// <param name="runKind">the kind of wizard (item or project)</param>
        /// <param name="customParams">custom parameters</param>
        public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            AppXamlUpdater.ModifyAppXaml(automationObject);
        }

        /// <summary>
        /// Indicates whether the specified project item should be added to the project.
        /// </summary>
        /// <param name="filePath">the file path</param>
        /// <returns>whether the specified file should be added to the project</returns>
        public bool ShouldAddProjectItem(string filePath)
        {
            return false;
        }

        #endregion
    }
}
